import numpy as np
import cv2 as cv

img = cv.imread('../test_datas/messi5.jpg',0)
rows,cols = img.shape


M = np.float32([[1,0,-50],
                [0,1,50]])
dst = cv.warpAffine(img, M, (cols,rows))

cv.imshow('img',img)
cv.imshow('dst',dst)
cv.waitKey(0)
cv.destroyAllWindows()